package com.xcity.pomelo.request;

import com.xcity.game.common.ConfirmOperation;
import com.xcity.pomelo.PomeloRoute;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.PomeloPacket;

@PomeloMessage(route = PomeloRoute.COMBAT_ACTION)
public class CombatActionRequest extends PomeloPacket {

	private long id; // 行动单位的id(默认为0表示主角)
	private int mp; // 同步该单位的mp
	private byte useSkill; // 是否使用技能
	private long targetId; // 目标单位的id(默认为0表示由服务器选择攻击目标)
	private int index; // 当前动作索引

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getMp() {
		return mp;
	}

	public void setMp(int mp) {
		this.mp = mp;
	}

	public byte getUseSkill() {
		return useSkill;
	}

	public void setUseSkill(byte useSkill) {
		this.useSkill = useSkill;
	}

	public long getTargetId() {
		return targetId;
	}

	public void setTargetId(long targetId) {
		this.targetId = targetId;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public boolean isUseSkill() {
		return useSkill == ConfirmOperation.OK;
	}

}
